/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package V003_MapLoader;

/**
 *
 * @author Smai
 */
public class Game {

  private ActionListener actionListener;
  private Player player;
  private Map map;

  public Game(ActionListener actionListener, Player player,Map map) {
    this.actionListener = actionListener;
    this.player = player;
    this.map = map;
  }

  public void update() {
    KeyInput();
  }

  public void KeyInput() {
    if (actionListener.arrowUp) {
      map.moving(0, -4);
      //actionListener.arrowUp = false;
    }

    if (actionListener.arrowDown) {
      map.moving(0, 4);
      //actionListener.arrowDown = false;
    }

    if (actionListener.arrowLeft) {
      map.moving(-4, 0);
      //actionListener.arrowLeft = false;
    }

    if (actionListener.arrowRight) {
      map.moving(4, 0);
      //actionListener.arrowRight = false;
    }

  }
}
